<?php

/*
 * gpa_new Description
 * date 16 Feb 10
 * time 17:17:53
 * @$package
 * @name tools_html
 * @filesource tools_html.php
 * @author Hanny Setiawan
 */

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title><?php echo $page_title; ?></title>
<script src="<?php echo getJsUrl(); ?>jquery.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php echo getCssUrl(); ?>home/home.css" type="text/css">
<link rel="stylesheet" href="<?php echo getAppCssUrl(); ?>user.css" type="text/css">

<!-- start jQuery menu -->
<link type="text/css" href="<?php echo getCssUrl(); ?>menu_apycom/menu.css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo getJsUrl(); ?>menu_apycom/menu.js"></script>
<!-- end of jQuery menu -->

<!-- start autocompleter -->
<script type='text/javascript' src='<?php echo getJsUrl(); ?>jquery.bgiframe.min.js'></script>
<script type='text/javascript' src='<?php echo getJsUrl(); ?>jquery.ajaxQueue.js'></script>
<script type='text/javascript' src='<?php echo getJsUrl(); ?>thickbox-compressed.js'></script>
<script type='text/javascript' src='<?php echo getJsUrl(); ?>jquery.autocomplete.min.js'></script>
<link rel="stylesheet" type="text/css" href="<?php echo getCssUrl(); ?>jquery.autocomplete.css" />
<link rel="stylesheet" type="text/css" href="<?php echo getCssUrl(); ?>thickbox.css" />
<script type='text/javascript'>
    (function($){
        $(function(){
            var option = {
                minChars: 1,
                width: 200,
                scroll: true
            };

            $('#add_camera').autocomplete('<?php echo getAppUrl('tools', 'search') . '/camera/'; ?>',option);
            $('#add_lens').autocomplete('<?php echo getAppUrl('tools', 'search') . '/lens/'; ?>',option);
            $('#add_filter').autocomplete('<?php echo getAppUrl('tools', 'search') . '/filter/'; ?>',option);
        });
    })(jQuery);
</script>
<!-- end of autocompleter -->

</head>

<body>

<div id="root">
    <div id="Table_01">
        <div id="index">
    	<div id="leftTop">
            <img class="logo" src="<?php echo getImgUrl(); ?>/home/logogpa.png" width="310" height="90" alt="Logo GPA">
        </div>
  		<div id="rightTop">
        	<div id="rTop">
            	<div class="login">
                	<div class="login-text">
                		<?php echo $usermenus; ?>
                    </div>
                    <div class="login-box">
                    	<input name="login-field" type="text" maxlength="30">
                    </div>
                </div>
            </div>
        	<div id="rBottom">
        		<div id="menu">
				<?php echo $mainmenus; ?>
                </div>
        	</div>
    	</div>
	</div>
        <div id="index002">
            <div id="add-menu">
                <?php if(@$self_profile) { ?>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/profile/">Profile Overview</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/edit/">Edit Profile</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/tools/">Tools</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/albums/">Albums</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/messages/">Messages</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/avatar/">Avatar</a> |
                </div>
                <div id="add-menu-link">
                    <a href="<?php echo getHttpUrl(); ?>user/upgrade/">UPGRADE MEMBERSHIP!</a>
                </div>
                <?php } ?>
            </div>
            <style type="text/css">
                .content form h3 {
                    color: orange;
                }
                .content form table {
                    width: 100%;
                    border-top: #202020 solid 1px;
                    border-left: #202020 solid 1px;
                    margin: 0 15px 25px 15px;
                }
                .content form table th {
                    background-color: #151515;
                    border-right: #202020 solid 1px;
                    border-bottom: #202020 solid 1px;
                    padding: 5px;
                }
                .content form table td {
                    border-right: #202020 solid 1px;
                    border-bottom: #202020 solid 1px;
                    padding: 5px;
                }
                .content form table td span {
                    color: #fff;
                }
                .content form table td a {
                    color: #ff1f1f;
                }
                .content form table .add_tool td {
                    background-color: #151515;
                }
                .content form table .add_tool td p {
                    float: right;
                    clear: both;
                    margin-top: 5px;
                }
                .content form table input[type=text] {
                    border: 1px solid #303030;
                    background-color: #050505;
                    padding: 2px;
                    color: #f0f0f0;
                    width: 200px;
                }
                .content form table input[type=submit] {
                    border: 1px solid #303030;
                    background-color: #050505;
                    padding: 2px;
                    color: #ff5f5f;
                    font-weight: bold;
                }
            </style>
            <div class="content">
                <form name="tool_camera" action="<?php echo getAppUrl('tools', 'addTool') . '/camera' ?>" method="post">
                    <h3>Camera</h3>
                    <table border="0" cellpadding="0" cellspacing="0">
                        <?php if(isset($tools['camera'])): ?>
                        <tr>
                            <th width="50">No</th><th>Tools Name</th><th width="100">&nbsp;</th>
                        </tr>
                        <?php $i=1; foreach($tools['camera'] as $camera): ?>
                        <tr>
                            <td align="right"><?php echo $i++; ?></td><td><p><?php echo $camera['tools']; ?></p></td><td align="center"><a href="<?php echo getAppUrl('tools', 'delTool') . '/' . $camera['tool_id'] ?>">delete</a></td>
                        </tr>
                        <?php endforeach; ?>
                        <?php else: ?>
                        <tr>
                            <td colspan="3">No Camera</td>
                        </tr>
                        <?php endif; ?>
                        <tr class="add_tool">
                            <td colspan="3">
                                <p>Add Tool : <input type="text" name="tool_name" id="add_camera"/></p>
                                <p><input type="submit" name="add_camera" value="Add!" /></p>
                            </td>
                        </tr>
                    </table>
                </form>
                <form name="tool_lens" action="<?php echo getAppUrl('tools', 'addTool') . '/lens' ?>" method="post">
                    <h3>Lens</h3>
                    <table border="0" cellpadding="0" cellspacing="0">
                        <?php if(isset($tools['lens'])): ?>
                        <tr>
                            <th width="50">No</th><th>Tools Name</th><th width="100">&nbsp;</th>
                        </tr>
                        <?php $i=1; foreach($tools['lens'] as $lens): ?>
                        <tr>
                            <td align="right"><?php echo $i++; ?></td><td><p><?php echo $lens['tools']; ?></p></td><td align="center"><a href="<?php echo getAppUrl('tools', 'delTool') . '/' . $lens['tool_id'] ?>">delete</a></td>
                        </tr>
                        <?php endforeach; ?>
                        <?php else: ?>
                        <tr>
                            <td colspan="3">No Lens</td>
                        </tr>
                        <?php endif; ?>
                        <tr class="add_tool">
                            <td colspan="3">
                                <p>Add Tool : <input type="text" name="tool_name" id="add_lens"/></p>
                                <p><input type="submit" name="add_camera" value="Add!" /></p>
                            </td>
                        </tr>
                    </table>
                </form>
                <form name="tool_filter" action="<?php echo getAppUrl('tools', 'addTool') . '/filter' ?>" method="post">
                    <h3>Filter</h3>
                    <table border="0" cellpadding="0" cellspacing="0">
                        <?php if(isset($tools['filter'])): ?>
                        <tr>
                            <th width="50">No</th><th>Tools Name</th><th width="100">&nbsp;</th>
                        </tr>
                        <?php $i=1; foreach($tools['filter'] as $filter): ?>
                        <tr>
                            <td align="right"><?php echo $i++; ?></td><td><p><?php echo $filter['tools']; ?></p></td><td align="center"><a href="<?php echo getAppUrl('tools', 'delTool') . '/' . $filter['tool_id'] ?>">delete</a></td>
                        </tr>
                        <?php endforeach; ?>
                        <?php else: ?>
                        <tr>
                            <td colspan="3">No Filter</td>
                        </tr>
                        <?php endif; ?>
                        <tr class="add_tool">
                            <td colspan="3">
                                <p>Add Tool : <input type="text" name="tool_name" id="add_filter"/></p>
                                <p><input type="submit" name="add_camera" value="Add!" /></p>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
	</div>
    </div>
</div>
    	<a id="thanks" href="http://apycom.com/">Apycom jQuery Menus</a>
</body>
</html>